package org.example.enums;

/**
 * Description: 公式系数枚举
 * Created by 陈宇 on 2024-12-27 14:08
 * Created with IntelliJ IDEA.
 * @author 陈宇
 */
public enum FormulaCoefficientEnum {

    // 计算协作度的权重
    W_2("PR 中和指定开发者讨论的次数", 0.4642),
    W_3("Issue 中和指定开发者讨论的次数", 0.1426),
    W_4("PR 中总的讨论次数", 0.0539),
    W_5("Issue 中总的讨论次数", 0.0539),
    W_6("指定开发者贡献度变化", 0.1427),
    W_7("开发者被提及数", 0.1427),

    // 计算项目规模的权重
    W_8("代码行数", 0.3476),
    W_9("贡献者数量", 0.2130),
    W_10("Issue 数量", 0.0619),
    W_11("PR 数量", 0.1319),
    W_12("Star 数量", 0.2130),
    W_13("Fork 数量", 0.0326);

    private String msg;
    private Double weight;

    FormulaCoefficientEnum(String msg, Double weight) {
        this.msg = msg;
        this.weight = weight;
    }

    /**
     * 获取这是谁的权重
     * @return
     */
    public String getMsg() {
        return msg;
    }

    /**
     * 权重值
     * @return
     */
    public Double getWeight() {
        return weight;
    }
}
